package com.ruoyi.web.controller.shop.shopuser.mapper;

import java.util.List;
import java.util.Map;

import com.ruoyi.web.controller.shop.shopuser.domain.ShopRole;
import com.ruoyi.web.controller.shop.shopuser.domain.ShopUser;

/**
 * 商户信息Mapper接口
 * 
 * @author ruoyi
 * @date 2020-10-30
 */
public interface ShopUserMapper 
{
    /**
     * 查询商户信息
     * 
     * @param userId 商户信息ID
     * @return 商户信息
     */
    public Map<String,Object> selectShopUserById(Long userId);
    public Map<String,Object> selectShopRoleByUserId(Long userId);
    public ShopRole selectShopRoleById(Long roleId);

    /**
     * 查询商户信息列表
     * 
     * @param map 商户信息
     * @return 商户信息集合
     */
    public List<Map<String,Object>> selectShopUserList(Map<String,Object> map);

    public List<Map<String, Object>> selectShopRoleList(Map<String, Object> map);
    public List<Map<String, Object>> selectShopMenuList(Map<String, Object> map);
    public List<Map<String, Object>> queryMenuByRoleId(Map<String,Object> map);

    /**
     * 新增商户信息
     * 
     * @param shopUser 商户信息
     * @return 结果
     */
    public int insertShopUser(ShopUser shopUser);
    public int insertShopUserRole(Map<String,Object> map);
    public int insertShopRoleMenu(Map<String,Object> map);
    public int insertShopRole(ShopRole shopRole);

    public int countRole(Long roleId);

    /**
     * 修改商户信息
     * 
     * @param shopUser 商户信息
     * @return 结果
     */
    public int updateShopUser(ShopUser shopUser);
    public int resetPassword(ShopUser shopUser);
    public int countUserName(String userName);
    public int updateShopRole(ShopRole shopRole);

    /**
     * 删除商户信息
     * 
     * @param suserId 商户信息ID
     * @return 结果
     */
    public int deleteShopUserById(Long suserId);
    public int removeShopRole(Long roleId);

    public int removeShopRoleMenuByRoleId(Long roleId);
    public int removeShopUserRoleByUserId(Long userId);

    /**
     * 批量删除商户信息
     * 
     * @param suserIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteShopUserByIds(Long[] suserIds);
}
